package com.lebang.feign;

import com.lebang.feign.fallback.CencesHundredPointFallback;
import com.lebang.model.RequestUserInfo;
import com.lebangweb.response.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;

/**
 * @author ljx
 */
@FeignClient(name = "wangzhuan-earns", contextId = "wangzhuan-earns-hundredPoint", fallback = CencesHundredPointFallback.class)
public interface CencesHundredPointFeign {

    @PostMapping("/cences/hundredpoint/list")
    JsonData selectData(@RequestBody RequestUserInfo userInfo,
                        @RequestParam("page") Integer page,
                        @RequestParam("limit") Integer limit,
                        @RequestParam("appStore")String appStore,
                        @RequestParam("star")Integer star,
                        @RequestParam("end")Integer end);

    @PostMapping("/cences/hundredpoint/lastCheck")
    JsonData starDataInit(@RequestBody RequestUserInfo userInfo,
                          @RequestParam("end") LocalDateTime end,
                          @RequestParam("activeUserCount") String activeUserCount,
                          @RequestParam("appStore") String appStore);

    @PostMapping("/cences/hundredpoint/delete")
    JsonData deleteById(@RequestParam("time") Integer time);
}
